package db;

// Customer.java
// Represents a bank customer

public class Customer {

	private int loginId; // account holders loginId
	private int password; // account holders password
	private int cpr; // account holders CPR
	private String firstName; // account holders first name
	private String lastName; // account holders last name
	private double totalBalance1; // funds deposits of account 1
	private double totalBalance2; // funds deposits of account 2
	private double totalBudget3; // funds deposits of account 3

	// Customer constructor initializes attributes
	public Customer(int theLoginId, int thePassword, int theCpr, String theFirstName,
			String theLastName){
			//double theTotalBalance1,
			//double theTotalBalance2, double theTotalBalance3) {
		loginId = theLoginId;
		password = thePassword;
		cpr = theCpr; 
		firstName = theFirstName;
		lastName = theLastName;
		//totalBalance1 = theTotalBalance1;
		//totalBalance2 = theTotalBalance2;
		//totalBudget3 = theTotalBalance3;
	} // end Customer constructor

	// determines whether a user-specified Password matches Password in Customer
	// table
	//public boolean validatePassword(int userPassword) {
	//	if (userPassword == password)
	//		return true;
	//	else
	//		return false;
	//} // end method validatePassword

	// returns customer firstname
	public String getFirstName() {
		return firstName;
	} // end getFirstName

	// returns customer lastname
	public String getLastName() {
		return lastName;
	} // end getLastName

	// returns customer CPR
	public int getCpr() {
		return cpr;
	} // end getCpr

	// returns loginId
	public int getLoginId() {
		return loginId;
	} // end method getAccountNumber

	// returns customer PIN
	public int getPin() {
		return password;
	} // end method getPin

	// returns the total balance of account 1
	public double getTotalBalance1() {
		return totalBalance1;
	} // end method getTotalBalance1

	// returns the total balance of account 2
	public double getTotalBalance2() {
		return totalBalance2;
	} // end method getTotalBalance2

	// returns the total balance of account 3
	public double getTotalBalance3() {
		return totalBudget3;
	} // end method getTotalBalance3

	// credits an amount to account 1
	public void creditBalance1(double amount) {
		totalBalance1 += amount; // add to total balance of balance 1
	} // end method credit

	// debits an amount from account 1
	public void debitBalance1(double amount) {
		totalBalance1 -= amount; // subtract from total balance of account 1
	} // end method debit

	// credits an amount to account 2
	public void creditBalance2(double amount) {
		totalBalance2 += amount; // add to total balance of balance 2
	} // end method credit

	// debits an amount from account 1
	public void debitBalance2(double amount) {
		totalBalance2 -= amount; // subtract from total balance of account 2
	} // end method debit

} // end class Account

